<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
StyleSheet
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="StyleSheet";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-StyleSheet.jsc.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev">&nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"--><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../lang/StringBuffer.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="../lang/System.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StyleSheet.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>

<!-- ======== START OF CLASS DATA ======== -->
<H2>Class StyleSheet</H2>
<PRE>Object
   |
   +--<a href='../lang/JObject.html'>js.lang.JObject</a>
         |
         +--<a href='../lang/BObject.html'>js.lang.BObject</a>
               |
               +--<b>js.dom.StyleSheet</b>
</PRE>


<HR>
<DL>
   <!-- Class definition -->
   <DT>class 
   <B>StyleSheet</B>
   
      <DT>extends <a href='../lang/BObject.html'>js.lang.BObject</a> 
   

</DL>
   
   <P>
   <BR/>This is the StyleSheet class.  
 <BR/><B>Version: </B>2.01, 10/23/05  <BR/><BR/><B>Author:</B> Wan Changhua  <BR/><I>Defined in <a href='overview-summary-StyleSheet.jsc.html'>StyleSheet.jsc</a></I><BR/><BR/>
   </P>
   
   <HR>

<!-- ======== NESTED CLASS SUMMARY ======== -->

<!-- ======== END NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


   

<!-- =========== END FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
   <TD>
      <CODE>
	 <B>
	    <A HREF="StyleSheet.html#StyleSheet()">js.dom.StyleSheet</a> 
	 </B>
	 (cs)
      </CODE>
      <BR>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      Create a new js.dom.StyleSheet instance.
      </TD>
</TR>
</TABLE>

<!-- ======== END CONSTRUCTOR SUMMARY ======== -->

&nbsp;

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>


   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#addRule">addRule</A></B>(sSelector, sStyle , iIndex)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Creates a new style rule for the styleSheet object, 
 and returns the index into the rules collection.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&nbsp;void</CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#removeRule">removeRule</A></B>(iIndex)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Deletes an existing style rule for the styleSheet object,
 and adjusts the index of the rules collection accordingly.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&lt;static&gt;&nbsp;<a href="StyleSheet.html">js.dom.StyleSheet</a></CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#addCssLink">addCssLink</A></B>(url, doc)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Creates a new StyleSheet object and adds css link file for it.
      </TD>
   </TR>

   <TR BGCOLOR="white" CLASS="TableRowColor">
      <TD ALIGN="right" VALIGN="top" WIDTH="1%">
	 <FONT SIZE="-1">
	    <CODE>&lt;static&gt;&nbsp;<a href="StyleSheet.html">js.dom.StyleSheet</a></CODE>
	 </FONT>
      </TD>
      <TD>
	 <CODE>
	    <B>
	       <A HREF="#create">create</A></B>(doc)
	 </CODE>
	 <BR>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 Creates a new StyleSheet object
      </TD>
   </TR>


</TABLE>



&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class <a href="../lang/BObject.html">js.lang.BObject</a></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>
<!-- Inherited methods -->
<a href="../lang/BObject.html#getUniqueId">getUniqueId</a>, <a href="../lang/BObject.html#globalize">globalize</a>, <a href="../lang/BObject.html#unglobalize">unglobalize</a>
</CODE></TD>
</TR>
</TABLE>
&nbsp;

<P>
<!-- ========== END METHOD SUMMARY =========== -->


<!-- ============ FIELD DETAIL START =========== -->


<!-- ============ FIELD DETAIL END =========== -->

    <!-- ========= CONSTRUCTOR DETAIL START ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
      <TD COLSPAN=1>
      <FONT SIZE="+2"><B>Constructor Detail</B></FONT>
      </TD>
   </TR>
</TABLE>

<A NAME="StyleSheet()"><!-- --></A><H3>
StyleSheet</H3>
<PRE><B>StyleSheet</B>(cs)</PRE>


<UL>
   Create a new js.dom.StyleSheet instance.
 Inherit from BObject
</UL>



   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>Object</CODE> - > cs  
     </UL>
   
   
   </UL>


<!-- Constructor return value(s) -->

   <UL>
   <B>Returns:</B>
     <UL>
     A new StyleSheet object     
     </UL>
   </UL>

<!-- End constructor return value(s) -->

<!-- ADDITIONAL ATTRIBUTES -->

<UL>   
<B>Version: </B>2.01, 10/23/05  <BR/><BR/><B>Author:</B> Wan Changhua  <BR/>
</UL>

<HR/>
<!-- END ADDITIONAL ATTRIBUTES  -->

<!-- ========= CONSTRUCTOR DETAIL END ======== -->


<!-- ============ METHOD DETAIL START ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
   <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
      <TD COLSPAN=1><FONT SIZE="+2">
         <B>Method Detail</B></FONT>
      </TD>
   </TR>
</TABLE>

<!-- One single method detail entry -->

   <A NAME="addRule"><!-- --></A>
   <H3>addRule</H3>
   <PRE>void <B>addRule</B>(sSelector, sStyle , iIndex)</PRE>
   
      <UL>Creates a new style rule for the styleSheet object, 
 and returns the index into the rules collection.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>String</CODE> - > sSelector that specifies the selector for the new rule. 				Single contextual selectors are valid  
      </UL> 
   
     <UL><CODE>String</CODE> - > sStyle that specifies the style assignments for this style rule.  				This style takes the same form as an inline style specification.  				For example, "color:blue" is a valid style parameter.  
      </UL> 
   
     <UL><CODE>int</CODE> - > iIndex Integer that specifies the location in the rules collection to add the new style rule.  				If an index is not provided, the rule is added to the end of the collection by default.    
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="removeRule"><!-- --></A>
   <H3>removeRule</H3>
   <PRE>void <B>removeRule</B>(iIndex)</PRE>
   
      <UL>Deletes an existing style rule for the styleSheet object,
 and adjusts the index of the rules collection accordingly.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>int</CODE> - > iIndex Integer that specifies the index value of the rule to be deleted from the style sheet. 				If an index is not provided, the first rule in the rules collection is removed.    
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="addCssLink"><!-- --></A>
   <H3>addCssLink</H3>
   <PRE>&lt;static&gt; <a href="StyleSheet.html">js.dom.StyleSheet</a> <B>addCssLink</B>(url, doc)</PRE>
   
      <UL>Creates a new StyleSheet object and adds css link file for it.</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>String</CODE> - > url the url of the css file  
      </UL> 
   
     <UL><CODE>Document</CODE> - > doc The document that the style sheet apply it.  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        a new StyleSheet object   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>

   <A NAME="create"><!-- --></A>
   <H3>create</H3>
   <PRE>&lt;static&gt; <a href="StyleSheet.html">js.dom.StyleSheet</a> <B>create</B>(doc)</PRE>
   
      <UL>Creates a new StyleSheet object</UL>
   

   <!-- METHOD PARAMETERS START -->
   
   <UL>
   <B>Parameters:</B>
   
     <UL><CODE>Document</CODE> - > doc Document that specifies the document object of the StyleSheet to be created on the document. 				default is current document.  
      </UL> 
   
   </UL>
   
   <!-- METHOD PARAMETERS END -->

   
   <UL>
   <B>Returns:</B>
        <UL>
        a new StyleSheet object   
        </UL>
   </UL>
   

   <!-- ADDITIONAL ATTRIBUTES START -->
   
   <!-- ADDITIONAL ATTRIBUTES  END -->
<HR>



<!-- ============ METHOD DETAIL END ========== -->

<!-- ========= END OF CLASS DATA ========= -->

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">  <A HREF="overview-summary-StyleSheet.jsc.html"><FONT CLASS="NavBarFont1"><B>File</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><b>Tree</b></FONT></A>&nbsp;</TD>
  <!--TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"-->    <!--A HREF="deprecated-list.html"--><!--FONT CLASS="NavBarFont1">Deprecated</FONT--><!--/A--><!--&nbsp;</TD-->
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B></B>
</EM>
</TD
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../lang/StringBuffer.html"><B>PREV CLASS</B></A><!-- 
   NEXT CLASS 
-->
&nbsp;<A HREF="../lang/System.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StyleSheet.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<SCRIPT>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>

<!-- =========== END OF NAVBAR =========== -->

<HR>
<FONT SIZE="-1">

</FONT>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Thu Nov 17 20:10:21 2005</div>
</BODY>
</HTML>
